package util;

import java.io.File;

import org.apache.log4j.Logger;

/**
 * @author suwy
 * @date 2013-8-2
 * @todo TODO
 */
public class CountFileInFolder {
	
	private static Logger LOG = Logger.getLogger(CountFileInFolder.class);

	private void countFiles() {
		int count = 0;
		for(int i = 0; i < Conts.fileNames.length; i++) {
			count = 0;
			File refFile = new File(Conts.HTM_ROOT_PATH+ Conts.fileNames[i] + "/");
			if(refFile.exists()) {
				for(File file : refFile.listFiles()) {
					if(file.isFile()) {
						++count;
					}
				}
			}
			LOG.info(Conts.fileNames[i] + ": " +count);
		}
	}
	
	public static void main(String[] args) {
		CountFileInFolder instance = new CountFileInFolder();
		instance.countFiles();
	}
}